<?php

require 'header.php';
require 'DAO.php';
require 'authorisation.php';

$con = new connection();

$result = $con->fetchFeed();

header('Content-type: text/xml');
echo '<FEED>';
foreach($result as &$row) {
    echo '<POST>
        <MESSAGE>'.$row[1].'</MESSAGE>
        <DT>'.$row[2].'</DT>
        <POSTER>'.$row[3].'</POSTER>
        </POST>';
}
echo '</FEED>';

?>
